Skip to main content

Stamping API

Apart from the web interface, edexa.com's blockchain stamping functionality is also possible through an API interaction. In order to get access to our API please create an account.

tip
MAINNET BASEURL
  https://api-edexagw.edexa.com/bstamp/
TESTNET BASEURL
  https://api-edexagw.io-world.com/bstamp/ 

Add Stamp

POST hash
  • This endpoint will allow you to store metadata to your stamping: hash, filename and meta-data and the parameters marked with * are required.
  • You have to pass your Bearer Token via the Authorization parameter through the headers.
POST: Add Stamp
cURL
curl --location --request POST 'https://api-edexagw.io-world.com/bstamp/hash' \
--header 'Authorization: Bearer token' \
--header 'Content-Type: application/json' \
--data-raw '{
"hash": "6d6db6c25a4asa8ba7ce3fa164d53eb98942351e8e3411368a857d87babf1ed"
}'
Parameters
KeyValueTypeDescription
hash*666bd******************StringHash value
Responses
200: Success
{
"status": 200,
"message": "Your hash is created with block chain",
"data": {
"id": "618bd1************",
"hash": "6d6db6c2584******************",
"txid": "b40ff5f7b3a90************************",
"code": "c28***",
"filename": "test.pdf"
}
}
401: Token passed in headers is not valid
{
"status": 401,
"message": "Invalid auth token"
}
409: Conflict, The request you are doing is already exist in system
{
"status": 409,
"message": "Stamp Already Exists"
}
500: Some Technical Issue Occured
{
"status": 500,
"message": "Something went wrong, please try again"
}

Get Stamp Deatils

GET hash?id=code
  • The GET Stamp API call will check whether a hash has been posted on the selected blockchain. This endpoint can also be used to fetch the transaction id, hash details, or other metadata associated with the stamp that you have created.
  • To get the Stamped Value, you can pass hash or txId or code as query parameter and required parameters are marked with *.
  • The txId is Unique Transaction ID received from blockchain
  • The code is Unique shord code generated correspond to hash for each stamped file and hash
  • You have to pass your Bearer Token via the Authorization parameter through the headers.
GET: Stamp Details
cURL
curl --location --request GET 'https://api-edexagw.io-world.com/bstamp/hash?id=aaa***' \
--header 'Authorization: Bearer token'
Parameters
KeyValueDescription
id*aaa****Stringcode or hash or txid
Responses
200: Success
{
"status": 200,
"message": "Get details successfully",
"data": {
"hash": "6d6db6c25*******************************",
"originalDocHash": "6d6db6c25***************************",
"metaData": [
{
"latitude": "79.08",
"longitude": "24.22",
"description": "hello world"
}
],
"filename": "abc.png",
"type": "0",
"txid": "fd009477ea9************************************",
"timestamp": "2023-02-13T12:44:55.381Z",
"code": "e6a***",
"username": "Jhon Doe",
"userVerify": 0,
"isEsign": false,
"isPrivateBc": true
}
}
401: Token passed in headers is not valid
{
"status": 401,
"message": "Invalid auth token"
}
404: Not found, The stamp doesn't exist correspond to hash | txId | code in edeXa system
{
"status": 404,
"message": "Stamp does not exist"
}
500: Some Technical Issue Occured
{
"status": 500,
"message": "Something went wrong, please try again"
}

Get Stamps List

GET hash?page=1&limit=10
  • The GET Stamp API call will check whether a hash has been posted on the selected blockchain. This endpoint can also be used to fetch the transaction id, hash details, or other metadata associated with the stamp that you have created.
  • The required parameters page and limit are marked with *.
  • You have to pass your Bearer Token via the Authorization parameter through the headers.
GET: Stamp List
cURL
curl --location --request GET 'https://api-edexagw.io-world.com/bstamp/hash?page=1&limit=10' \
--header 'Authorization: Bearer token'
  • In Authorization Bearer Token is reuired.
Parameters
KeyValueTypeDescription
page*1NumberThe number of page
limit*10NumberTo set number of data at requested page
Responses
200: Success
{
"status": 200,
"message": "Get details successfully",
"data": {
"count": 1,
"files": [
{
"_id": "63ea***********",
"userId": "630625*********",
"clientId": "3e03130f*****************",
"blockchainId": "ac31800d*********************",
"name": "abc.png",
"txId": "fd009477ea9*******************",
"hash": "6d6db6c25a4as1a********************",
"type": "0",
"code": "e6a0fd",
"originalDocHash": "6d6db6c25a4as1*************",
"isEsign": false,
"isPrivateBc": true,
"createdAt": "2023-02-13T12:44:55.381Z",
"updatedAt": "2023-02-13T12:44:56.952Z"
},
],
}
}
401: Token passed in headers is not valid
{
"status": 401,
"message": "Invalid auth token"
}
500: Some Technical Issue Occured
{
"status": 500,
"message": "Something went wrong, please try again"
}

Multi Hash Stamping

POST multi-stamp
  • The hash and filename are required parameters and market with * and Other parameters are optional.
  • You have to pass your Bearer Token via the Authorization parameter through the headers.
POST: Multi Stamp
cURL
curl --location --request POST 'https://api-edexagw.io-world.com/bstamp/multi-stamp' \
--header 'Authorization: Bearer token' \
--header 'Content-Type: application/json' \
--data-raw '[
{
"hash": "666a*****************",
"filename": "xyz.png",
"isPrivate": false
},
{
"hash": "666a*****************",
"filename": "abac.png",
"isPrivate": true
}
]'
Parameters
KeyValueTypeDescription
hash*666bd******************StringThe hash which you want to store
file*abc.pdfStringName of file
Responses
200: Success
{
"status": 200,
"message": "Hash stamped successfully",
"data": [
{
"id": "62aaXXXXXXXXXXXX",
"hash": "6d6db6c25841aaaXXXXXXXXXXXX",
"txid": "351f5a33781f7XXXXXXXXXXXX"
},
{
"id": "631aXXXXXXXXXXXX",
"hash": "6a6234841aaaXXXXXXXXXXXX",
"txid": "351f5gh78881f7XXXXXXXXXXXX"
}
]
}
401: Token passed in headers is not valid
{
"status": 401,
"message": "Invalid auth token"
}
500: Some Technical Issue Occured
{
"status": 500,
"message": "Something went wrong, please try again"
}